#include "nixie.h"
#include <AT89X52.h>

void  Port0_choose()
{
P1=0xfe;
}

void Port0_0_Open()
{
P0=0x3F;
}

void Port0_1_Open()
{
P0=0x06;
}

void Port0_2_Open()
{
P0=0x5B;
}

void Port0_3_Open()
{
P0=0x4F;
}

void Port0_4_Open()
{
P0=0x66;
}

void Port0_5_Open()
{
P0=0x6D;
}

void Port0_6_Open()
{
P0=0x7D;
}

void Port0_7_Open()
{
P0=0x07;
}

void Port0_8_Open()
{
P0=0x7F;
}

void Port0_9_Open()
{
P0=0x6F;
}

void Port0_A_Open()
{
P0=0x77;
}

void Port0_B_Open()
{
P0=0x7C;
}

void Port0_C_Open()
{
P0=0x39;
}

void Port0_D_Open()
{
P0=0x5E;
}

void Port0_E_Open()
{
P0=0x79;
}

void Port0_F_Open()
{
P0=0x71;
}


void nixie()
{


Port0_choose();

Port0_0_Open();
Delay();

Port0_1_Open();
Delay();

Port0_2_Open();
Delay();

Port0_3_Open();
Delay();

Port0_4_Open();
Delay();

Port0_5_Open();
Delay();

Port0_6_Open();
Delay();

Port0_7_Open();
Delay();

Port0_8_Open();
Delay();

Port0_9_Open();
Delay();

Port0_A_Open();
Delay();

Port0_B_Open();
Delay();

Port0_C_Open();
Delay();

Port0_D_Open();
Delay();

Port0_E_Open();
Delay();

Port0_F_Open();
Delay();

}